<template>
  <div class="box">
    <header>
      <van-nav-bar left-arrow right-text="搜索" fixed @click-left="$router.go(-1)">
        <template #title>
          <van-search v-model="value" placeholder="请输入搜索关键词" clearable @search="onSearch"/>
        </template>
      </van-nav-bar>
    </header>
  </div>
</template>

<script>
import Vue from 'vue'
import { Search, NavBar } from 'vant'

Vue.use(Search)
Vue.use(NavBar)

export default {
  data () {
    return {
      value: ''
    }
  },
  methods: {
    onSearch () {}
  }
}
</script>
